<!--
 * @Descripttion: 
 * @version: 
 * @Author: EayCome
 * @Date: 2021-02-09 18:42:47
 * @LastEditors: EayCome
 * @LastEditTime: 2021-02-09 19:03:57
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组的合并与拆分</title>
    <script src="concat.js"></script>
</head>

<body>
    <script>
        // 数组合并
        // let arr = [1, 2, 3];
        // const result = arr.concat([456], 7, 8);
        // const result = concat(arr, [4, 5, 6], 7, 8)
        // console.log(result)


        // 数组切片 
        let arr = [1, 2, 3, 4, 5, 6, 7, 8];
        // let result = arr.slice(1, 6);
        const result = slice(arr, 1, 5);
        console.log(result)
    </script>

</body>

</html>